﻿#include "CWindow.h"

int APIENTRY wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ int) {
    _Window = std::make_unique<CWindow>();

    _Window->Register();

    _Window->InitInstance();

    MSG msg{ 0 };
    while (msg.message != WM_QUIT) {
        if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
        _Window->GameLoop();
    }

    return (int) msg.wParam;
}
